<!doctype html> 
<html> 
<head> 
  <meta charset="utf-8"/>
  <title>后台管理系统</title>
  <meta name="author" content="DeathGhost" />
  <link rel="stylesheet" type="text/css" href="css/style.css" />
  <!--[if lt IE 9]>
  <script src="js/html5.js"></script>
  <![endif]-->
  <style>
  li{float: left;}
  </style>
<script src="js/jquery.js"></script>
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
<script>
	(function($){
		$(window).load(function(){
			
			$("a[rel='load-content']").click(function(e){
				e.preventDefault();
				var url=$(this).attr("href");
				$.get(url,function(data){
					$(".content .mCSB_container").append(data); //load new content inside .mCSB_container
					//scroll-to appended content 
					$(".content").mCustomScrollbar("scrollTo","h2:last");
				});
			});
			
			$(".content").delegate("a[href='top']","click",function(e){
				e.preventDefault();
				$(".content").mCustomScrollbar("scrollTo",$(this).attr("href"));
			});
			
		});
	})(jQuery);
</script>

</head>
<body>
	<section class="rt_wrap content mCustomScrollbar">
 <div class="rt_content">
     



     <section>
      <h2><strong style="color:grey;"></strong></h2>
      <div class="page_title">
       <h2 class="fl">用户列表</h2>
       <a class="fr top_rt_btn">添加用户</a>
      </div>
      <table class="table">

       <tr>
        <th>编号</th>
        <th>昵称</th>
        <th>联系电话</th>
        <th>邮箱</th>
        <th>操作</th>
       </tr>
       @foreach($list as $v)
       <tr>
        <td>{{$v->user_id}}</td>
        <td>{{$v->user_name}}</td>
        <td>{{$v->user_phone}}</td>
        <td>{{$v->user_email}}</td>
        <td>
         <a href="javascript:void(0);" class="dels" dels="{{$v->user_id}}">删除</a>
        </td>
       </tr>
       @endforeach
      </table>
      <aside class="paging">
       <?php echo $list->render() ?>
      </aside>
     </section>
     

 </div>
</section>
</body>
<script type="text/javascript">
$('.dels').click(function(){
   var id=$(this).attr('dels');
   var dels=$(this).parent().parent();
   var data={'id':id,'_token':"{{ csrf_token() }}"};
   var url="userList";
   $.post(url,data,function(msg){
    if(msg){
      dels.remove();
    }
   })
})

</script>
</html>


